package model

import (
	"time"
)

// type User struct {
// 	ID           uint `gorm:"primaryKey;" json:"id"`
// 	CreatedAt    time.Time
// 	UpdatedAt    time.Time
// 	Passwrod     string  `gorm:"not null"`
// 	Name         string  `gorm:"not null;unique;size:256"`
// 	Email        string  `gorm:"not null;size:256"`
// 	DingWebHook  string  `gorm:"default:null;size:256"`
// 	Avatar       *string `gorm:"default:'null'"`
// 	Introduction *string `gorm:"default:'null'"`
// }

// UserAuth 用户 auth 库
type UserAuth struct {
	ID        uint `gorm:"primaryKey;" json:"id"`
	CreatedAt time.Time
	UpdatedAt time.Time
	Passwrod  string `gorm:"not null"`
	Name      string `gorm:"not null;unique;size:256"`
}

// UserInfo 用户信息库
type UserInfo struct {
	ID           uint `gorm:"primaryKey;autoIncrement:false;" json:"id"`
	CreatedAt    time.Time
	UpdatedAt    time.Time
	Nickname     *string  `json:"nickname"`
	Email        string   `gorm:"not null;size:256"`
	DingWebHook  *string  `gorm:"default:null;size:256"`
	Avatar       *string  `gorm:"default:null"`
	Introduction *string  `gorm:"default:null"`
	UserAuth     UserAuth `gorm:"foreignKey:id"`
}
